Introduction to X11 Xconq
=========================

Xconq includes an interface to the X Window System.  Since it is only for version 11 of X, we will call it X11 Xconq.  The interface is graphical, can work with either monochrome or color displays, and is capable of opening multiple displays, one for each player, if desired. It uses the Xt toolkit and Athena widgets.

Installing X11 Xconq
--------------------

The usual make and make install will generate and install the executable and library into usr/games/bin and usr/games/lib/xconq, respectively.  (See the file INSTALL in the main source directory for more detailed instructions.)

The name of the executable is xconq.

Playing the Introductory Game with X11 Xconq
--------------------------------------------

To begin an introductory game, give the command xconq -g intro.

Playing X11 Xconq
=================

Starting a New Game
-------------------

To play X11 Xconq, just type xconq.  You will get the default game, which has you and a single AI as the two opposing players, in a randomly generated 60x30 area that is mostly unexplored.  The game design in effect is called standard.  It is a generic ``Empire'' type game, with cities, armies, airplanes, and ships of various types.

If you're new to Xconq, and find that standard is too complicated and/or confusing, try the introductory game intro instead; type xconq -g intro to get it.  intro is generally like standard, but it has fewer types of units and terrain, you start with only one city, the one city is preset to build armies, there is more land, and the other player starts closer.  Note that some of these changes mean that luck plays a larger role in determining whether you win or lose; so if you find yourself losing, it may only be because your starting position was poor.  Success in the standard game, however, depends almost entirely on skill, so play it when you're more experienced with Xconq.

By default, the X11 interface opens up windows on the display named in the environment variable DISPLAY, and connects it with the first side and player in the game.

Xconq Command Options
.....................

The arguments to an Xconq command consist of a list of player specifications and possibly some additional options.

[NAME][,AI][/CONFIG][@DISPLAY][+ADV]
     Attempt to open a display on DISPLAY and assign a player/side to it. Options include naming the player NAME, adding an AI of type AI, using the side config file config and asking for an advantage of ADV. ADV defaults to 1. If NAME is not supplied, then NAME is assumed to be the display name. A display named just "_" is equivalent to the default display, as in the value of the environment variable DISPLAY.

You can get a variety of uses out of player specs.  For instance, the player spec ,ai+4 asks for an AI, of a default type appropriate to its side, with a starting advantage of 4. If you want to give yourself an advantage, just specify +4 anywhere on the command line.

The following options are always available:

-c N
     Write a checkpoint every N turns.

-design
     Make every side in the game be a designer.

-e[,AI][+ADV] N
     Create N sides and AIs to play them, using the optional AI and ADV to set the AI type and advantage of each.

-f FILENAME
     Play the game found in FILENAME.

-g GAMENAME
     Play the game GAMENAME, if one by that name exists in the library (the default, or the location specified with -L.

-h N
     Wait for N human players to join. [not yet implemented]

-help, --help
     List all of the options. If a game was loaded using -g or -f, also list all of the variants for the game.

-join
     Connect to a game named \fIgame\fP. [not yet implemented]

-L DIRECTORY
     Search in DIRECTORY for game modules.

-mail
     Arrange to run the game as play-by-email. If you use this option, each player must be given both a name and host, in the form of an Internet address. [not yet implemented]

-r
     Do not add a player on a local display. If you use this, you must list every player on the command line explicitly.

-w
     Suppress warnings.

-wait
     [not yet implemented]

--version
     Display version information.

-x
     Bring up a set of new game, variant, and player setup dialogs.

The following options only work if the game allows for the corresponding variants:

-M WIDTH[xHEIGHT][WCIRCUMF][+LAT][+LON]
     Set the size and position of the game area If only WIDTH is given, then the HEIGHT defaults to the same as WIDTH. Circumference defaults to 360, LAT and LON default to 0. The name of the variant is world-size.

-sq
     Set sides to move in sequence, one at a time. The variant is sequential, with a value of 1.

-sm
     Set sides to all move simultaneously. The variant is sequential, with a value of 0.

-t
     Set realtime variants.

-v
     Set the world to have been seen already. The variant is world-seen, with a value of 1.

-V
     Set everything to be seen all the time. The variant is see-all, with a value of 1 (true). If see-all defaults to being true for a game, then you can make it false by using -vsee-all=false or -vsee-all=0.

-v[NAME][=VALUE]
     Set the variant named NAME to have the value VALUE.  If the VALUE is not supplied, it defaults to 1 (true).

-vhelp
     Display variant help info. This lists the available variants as -help does.

If debugging has been compiled in, then the options -D and -R are also available. See the hacking chapter of the manual for more detail.

The following options apply only to the default X11 display:

-bg COLOR

-display DISPLAYNAME

-fg COLOR

-geometry GEOMETRY

-name NAME

New Game Dialogs
................

If you give the command line option -x, Xconq will display a series of dialogs that you can use to set up a game interactively.

Maps
----

Once the game has started, you have at least one ``map window'' open. (For brevity, these can be called just ``maps''). Each map window has identical capabilities, so you can play by using just one, or have one for each area of interest, or have some of them serve specialized purposes. For instance, you can have a map window that shows the entire world.

Map Parts
.........

Each map window consists of a number of panes, whose size you may adjust by dragging the small square grips that may be seen on the the pane boundaries.

     ----------------------------------------------------------
     |                                     |                  |
     |           history/notices           |                  |
     |                                     |                  |
     |-------------------------------------|     sides        |
     |           command prompt            |                  |
     |-------------------------------------|                  |
     |             turn/date               |------------------|
     |-------------------------------------|                  |
     |       |                             |                  |
     |       |      unit/cell info         |                  |
     |       |                             |                  |
     |       |-----------------------------|                  |
     |       |                             |    unit types    |
     |       |                             |                  |
     | ctrl  |                             |                  |
     | panel |                             |                  |
     |       |                             |                  |
     |       |         map view            |                  |
     |       |                             |                  |
     |       |                             |------------------|
     |       |                             |                  |
     |       |                             |                  |
     |       |                             |     panner       |
     |       |                             |                  |
     |       |                             |                  |
     ----------------------------------------------------------

The map view is the actual display of the world.

Each map may have one current position and one current unit. The current position is specially highlighted, and the info subwindow displays information about it.  If in addition there is a current unit at the current position, then it will be highlighted rather than the entire cell, and the info pane will describe it in detail.

The info pane has the general form

     <unit owner, type, name>       <hp> <acp>|<cp> <cxp>
     <location>
     <occupants>                    <supply>
     <plan>                         <more supply>
     <tasks>

Items like <hp> and acp have the form CURRENT/MAX, so that you can get an idea of how the value compares to what it could be.

Scrolling Maps
..............

It will nearly always be the case that the world is too large to be seen all at once.  You can scroll around in two ways.  First, if you are in survey mode, and click near any edge of the view, Xconq will put the position you clicked at the center of the view.  By clicking in the same place repeatedly, you can ``walk'' the view in any desired direction.

If you want to go directly to a particular part of the world, use the panner in the bottom right corner of the map window.  To use the panner, click and drag the shadowed box inside the panner.  The panner is sized to match the map, and the shadowed box is sized to match the view, so you can get a general idea of of where the map is within the world.

View Control Popup
..................

If you click the button labelled ``More...'' in the leftside controls, you will get a popup dialog that is a full set of viewing controls. Unlike the leftside view controls, these do not act at once; instead, you toggle them on or off, then click on ``Apply'' or ``Done'' to see the effects.  This allows you to make a number of changes, but only redraw the map once when you are ready to see the results.  ``Apply'' leaves the popup in place, while ``Done'' makes it go away.  You can leave the popup up permanently and continue play, if you like.

Note that each map will have its own separate view control popup, and that they're not clearly distinguished from each other.  Fortunately, these only affect display, not the game itself.

Play
----

The basic idea of play is to be in move mode, let the program select the next unit to do something, then give it a command, either by clicking the mouse or by typing on the keyboard.

Each map may be in either survey or move mode (see Modes) independently of the others.  In survey mode, the default actions are not to do anything, while in move mode, the default actions are to do things.  This principle applies to both mouse and keyboard commands. For instance, 'h' in survey mode moves the current position west by one cell, but in move mode it causes the current unit to try to move west by one cell.

Using the Mouse, excuse me, Pointer
...................................

Although in classic X style, all the actions may be arbitrarily rebound, for simplicity the default Xconq setup uses the left button for the most important actions.

Using the Keyboard
..................

The general commands (see Standard Keyboard Commands) all work.

Commands that operate on units will be applied to the current unit of the map.  If the map has no current unit, then you will get an error message.

Commands that need further input will generally request it from the prompt subwindow that is sandwiched between the history subwindow and the date subwindow.  You do not need to put the cursor over the prompt window to type into it however; when a prompt is up, any typed characters will be considered to be part of the answer to the prompt. You can type in an escape (C-[) character to cancel the command and clear the prompt.

If the request is for a unit type, such as when choosing a type to construct, you can choose the type either by typing its character, or by clicking on its entry in the unit type list.

The X11 interface defines these additional commands.

 v
     (flash).  Highlight the position of the current unit.

 {
     (z-in) Zoom in (cells appear larger).

 }
     (z-out) Zoom out (cells appear smaller).

close
     Close a map window.

map
     Open a new map window.

rv
     Switch to reverse video.

orders
     Popup a dialog for setting standing orders.

side
     Open a closeup of the side.

unit
     Open a closeup of the current unit.

world-map
     Open a world map window.

mono
     Switch to monochrome display. (debugging)

Saving and Restoring Games
..........................

The save command S saves games to save.xconq.  The saved game is a normal text file.  To restore the game, give the command xconq -f save.xconq.  The saved game preserves all of the player information, including display names, so the restored game will use all of the same displays as before.

You can change which displays go with which sides by using -r to suppress the addition of a default player, and listing all of the players explicitly, in the order desired.  For instance, suppose that the original 5-player game was started with the arguments foo:0.0 joe@bar:0.0 -e 2, then to just change the displays, restore with -f save.xconq -r baz:0.0 weeble:0.0 joe@andros:0.0. This puts the original person who started the game onto baz:0.0, and the other two humans on weeble:0.0 and andros:0.0, while leaving the two AIs unaffected.

This ability is also useful for swapping sides, although it can be tricky to get right.  For instance, -f save.xconq -r ,ai ,ai ,ai ,@foo:0.0 joe,@bar:0.0 restores the game, but gives the first three sides to the default AI, and the last two (which had been played by AIs) to humans, and disables the AIs that had been running them.  (The ,@ sequence effectively asks for an AI with an empty type name, which is interpreted to mean ``no AI''; otherwise the displays would have been opened, with an AI moving the units.)

Troubleshooting X11 Xconq
=========================

By far the most common problem with the X11 interface is setting up a game with multiple displays.  Future versions of Xconq will allow for players to come in at their leisure, but for now every display must be specified during startup.